package com.sc.nft.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.DaoWalletDetail;
import com.sc.nft.entity.MallDaoWallet;
import com.sc.nft.entity.MallDaoWalletDetail;
import com.sc.nft.enums.wallet.DaoWalletTypeEnum;
import com.sc.nft.enums.wallet.MallDaoWalletTypeEnum;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 商城dao钱包 服务类
 * </p>
 *
 * @author ligen
 * @since 2024-01-17
 */
public interface MallDaoWalletService {
    /**
     * 添加
     *
     * @param daoId  daoID
     * @param amount 金额
     * @param charge 手续费
     * @param type   类型
     * @param remark
     */
    void addBalance(Long daoId, BigDecimal amount, BigDecimal activityAmount, BigDecimal charge, MallDaoWalletTypeEnum type, String remark);

    /**
     * 冻结金额
     *
     * @param daoId
     * @param amount
     * @param charge
     * @param type
     * @param remark
     */
    void freezeBalance(Long daoId, BigDecimal amount, BigDecimal charge, MallDaoWalletTypeEnum type, String remark);

    /**
     * 获取dao商城钱包
     *
     * @param daoId
     * @return
     */
    MallDaoWallet getByDaoId(Long daoId);

    /**
     * @param daoId
     * @param amount
     */
    void refuse(Long daoId, BigDecimal amount);


    Page<MallDaoWalletDetail> getDaoWalletDetailPage(Long daoId, MallDaoWalletTypeEnum type, Date startTime, Date endTime, Page page, Boolean isActivity);

    /**
     * 减少余额
     *
     * @param daoId  daoID
     * @param amount 金额
     */
    void subBalance(Long daoId, BigDecimal amount, BigDecimal charge, MallDaoWalletTypeEnum type, String remark);

}
